package com.ming.mq.direct;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class DirectMQReceiver {

    @RabbitListener(queues = DirectConfig.DIRECTQUEUE1)
    public void receive1(Object msg){
        log.info("queue1-接收消息:{}",msg);
    }


    @RabbitListener(queues = DirectConfig.DIRECTQUEUE2)
    public void receive2(Object msg){
        log.info("queue2-接收消息:{}",msg);
    }
}
